 //把第三方代码完全分离开，即每次只打包项目自身的代码
 //安装jq的时候是  cnpm i jquery  -D   不是 cnpm i jQuery  -D

const webpack = require('webpack')
const {
  resolve
} = require('path')

module.exports = {
  entry: {
    vendors: ['jquery']
  },

  output: {
    filename: '[name].js',
    path: resolve(__dirname, 'dll'),
    library: '[name]_[hash]'
  },

  plugins: [
    new webpack.DllPlugin({
      name: '[name]_[hash]',
      path: resolve(__dirname, 'dll/manifest.json')
    }),
  ],
  mode: 'development'
}
